package net.wanho.util;

public class ThreadUtil {
    private static final ThreadLocal<String> threadLocal = new ThreadLocal<>();

    public static void setUserId(Integer userId) {
        threadLocal.set(userId.toString());
    }

    public static Integer getUserId() {
        String userId = threadLocal.get();
        return Integer.valueOf(userId);
    }
}
